<template>
	<view class="uni-padding-wrap uni-common-mt">
		<view>
			<video id="myVideo" src="https://qiniu-web-assets.dcloud.net.cn/unidoc/zh/2minute-demo.mp4"
				@error="videoErrorCallback" controls></video>
		</view>
	</view>
</template>

<script>
export default {
    data() {
        return {
            src: '',
        }
    },
	onLoad(option) {
		//获得其它页面传来的数据
		console.log(option.fid);
	},
    onReady: function(res) {
        // #ifndef MP-ALIPAY
        this.videoContext = uni.createVideoContext('myVideo')
        // #endif
    },
    methods: {
        videoErrorCallback: function(e) {
            uni.showModal({
                content: e.target.errMsg,
                showCancel: false
            })
        },
    }
}
</script>


<style>
video{
	/* video控件宽度100% */
	width: 100vw;
}
</style>
